# coding: utf-8
from wordcloud import WordCloud
import matplotlib.pyplot as plt
def generate_wordcloud(text):
    font_path = 'My.ttf' 
    wordcloud = WordCloud(width=1920, height=1080, font_path=font_path).generate(text)
    plt.figure(figsize=(100, 50))
    plt.imshow(wordcloud, interpolation='bilinear')
    plt.axis('off')
    plt.show()
text = input("请输入文字用来生成文字云：")
generate_wordcloud(text)
